package com.thor.palmmall.rest.order.converter;

import java.util.ArrayList;
import java.util.List;

import org.springframework.core.convert.converter.Converter;

import com.thor.commons.entity.UCN;
import com.thor.commons.util.ConverterUtil;
import com.thor.palmmall.rest.common.ASubjectWithDirectionConverter;
import com.thor.palmmall.rest.communicate.converter.UCNConverter;
import com.thor.palmmall.rest.meter.converter.APeriodValuesConverter;
import com.thor.palmmall.rest.order.AProductActivitie;
import com.thor.palmmall.rest.order.AProductProm;
import com.thor.palmmall.rest.order.AProductProm2;
import com.thor.palmmall.rest.order.AProductProm2List;
import com.thor.palmmall.spi.order.SProductActivitie;
import com.thor.palmmall.spi.order.SProductProm;
import com.thor.palmmall.spi.order.SProductProm2;
import com.thor.palmmall.spi.order.SProductProm2List;

public class AProductProm2ListConverter implements Converter<SProductProm2List, AProductProm2List> {
	private static AProductProm2ListConverter instance;
	public static AProductProm2ListConverter getInstance() {
		if (instance == null)
			instance = new AProductProm2ListConverter();
		return instance;
	}

	private AProductProm2ListConverter() {
	}

	@Override
	public AProductProm2List convert(SProductProm2List source) {
		if (source == null) {
			return null;
		}
		AProductProm2List target = new AProductProm2List();
		
	
		target.setaProductProm2(
	        ConverterUtil.convert(source.getsProductProm2(), AProductProm2Converter.getInstance()));
	
		
		return target;
	}

}
